﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>伪类选择器</title>
    <style>
        /*hover 设置鼠标悬停在元素上时的状态*/
        .box{
            width:200px;
            height:200px;
            background-color:green;
        }
        .box:hover{
            /*鼠标悬停之后的样式*/
            background-color:red;
            width:300px;
            height:300px;
        }
        /* after 在元素的尾部插入内容 */
        .box:after{
            content:'lll';
        }
        .box:before{
            content:'abc'
        }
    </style>
</head>
<body>
    <div class="box">love</div>
</body>
</html>